//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __ELACFG_H__
#define __ELACFG_H__

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define PROCESS_TOP     0x80000000                      // 2GB
#define PROCESS_LIMIT   (PROCESS_TOP - 0x400000)        // 2GB - 4MB

#ifndef _neptune

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_HEAP_BASE      0x40000000                  // 1GB

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_STACK_ALIGN    0x400000                    // 4MB

#else // _neptune

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_HEAP_BASE      0x68000000                  // 1GB + 640MB

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_STACK_ALIGN    0x100000                    // 1MB

#endif // _neptune

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define TLS_SIZE    (TLS_TOTAL_SLOTS * sizeof(PVoid))   // 256B

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define PROXY_ENTRY_BASE    0x7ffef000
#define PROXY_ENTRY_SIZE    0x10
#define PROXY_ENTRY_MASK    0x0f
#define PROXY_ENTRY_SHIFT   4
#define PROXY_ENTRY_NUM     0x80

//
// The definition is used for environment and device_path and redirect_info
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_BLOCK_BASE             0x3fff8000          // 1GB - 32KB
#define USER_BLOCK_SIZE             0x4000              // 16KB

//
// Environment
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_ENVIRONMENT_BASE   USER_BLOCK_BASE         // 1GB - 32KB
#define USER_ENVIRONMENT_SIZE   0x2000                  // 8KB
#define USER_ENVIRONMENT_LIMIT  (USER_ENVIRONMENT_BASE + USER_ENVIRONMENT_SIZE)

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define USER_DEVPATH_BASE       USER_ENVIRONMENT_LIMIT
#define USER_DEVPATH_SIZE       0x1A00                  // 6.5KB
#define USER_DEVPATH_LIMIT      (USER_DEVPATH_BASE + USER_DEVPATH_SIZE)

//
// The other definition is in \kernel\major\inc\mantle\asdef.h
//
#define REDIRECT_INFO_BASE      USER_DEVPATH_LIMIT
#define REDIRECT_INFO_SIZE      0x600                   // 1.5KB
#define REDIRECT_INFO_LIMIT     (REDIRECT_INFO_BASE + REDIRECT_INFO_SIZE)

#endif //__ELACFG_H__
